/*
 * Wire
 * Copyright (C) 2018 Wire Swiss GmbH
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see http://www.gnu.org/licenses/.
 *
 */

.collection-list {
  display: flex;
  flex-direction: column;
  padding: 24px 20px 64px;
}

// Sections
.collection-section {
  display: inline-block;
  max-width: var(--collection-max-section-width);

  > header {
    display: flex;
    height: 24px;
    align-items: center;
    margin-bottom: 8px;
  }

  & + & {
    margin-top: 32px;
  }
}

.collection-date-separator {
  .label-bold-xs;

  display: flex;
  width: 100%;
  height: 24px;
  align-items: center;
  margin-bottom: 8px;

  &:not(:first-of-type) {
    margin-top: 32px;
  }
}

.collection-header-icon {
  width: 30px;
  color: var(--foreground);
  fill: var(--foreground);
  text-align: center;
  svg path {
    fill: var(--foreground);
  }
}

.collection-header-all {
  .button-reset-default;
  .font-size-xs;

  margin-right: 0;
  margin-left: auto;
  font-weight: var(--font-weight-bold);
}

// Images
.collection-images {
  display: flex;
  max-width: calc((var(--collection-image-size) + var(--collection-images-padding)) * var(--collection-images-per-row));
  flex-wrap: wrap;
  border-radius: 4px;
}

.collection-image {
  padding: var(--collection-images-padding);
  border-radius: 6px;
  background-color: transparent;

  img {
    border-radius: 6px;
  }
}

// Files
.collection-file {
  width: 100%;
}

// Videos
.collection-video {
  height: var(--collection-image-size);
  flex: 1 1 auto;
  outline: 1px solid #fff;
}

// Links
.collection-link {
  margin-left: var(--conversation-message-sender-width);
}

// Details
.collection-details-header {
  display: flex;
  width: 100%;
  height: 24px;
  align-items: center;
  margin-top: 24px;
  margin-bottom: 8px;
}
